To export the all the column data in a view of a module via DXL scripting

Hello,

Can anyone please help me how to export a particular view in module of DOORS into an excel file(to a particular location) via DXL scripting DOORS 9.3.

It should load the particular view and export it automatically(containing all the data in a view).

Thanks a ton in advance.

Regards,
Shriraam
SystemAdmin - Wed Feb 20 07:09:57 EST 2013

Re: To export the all the column data in a view of a module via DXL scripting
Mathias Mamsch - Wed Feb 20 07:44:47 EST 2013

Well the easiest way is to use the build in excel export, and automate it if necessary. Look for "batch export" using the search. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: To export the all the column data in a view of a module via DXL scripting
SystemAdmin - Wed Feb 20 07:54:25 EST 2013

Mathias Mamsch - Wed Feb 20 07:44:47 EST 2013
Well the easiest way is to use the build in excel export, and automate it if necessary. Look for "batch export" using the search. Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Thanks for your reply.I need it in DXL scripting.

Re: To export the all the column data in a view of a module via DXL scripting
SystemAdmin - Wed Feb 20 09:03:30 EST 2013

SystemAdmin - Wed Feb 20 07:54:25 EST 2013
Thanks for your reply.I need it in DXL scripting.

Look for commas.dxl on your harddisk

Re: To export the all the column data in a view of a module via DXL scripting
Mathias Mamsch - Wed Feb 20 10:39:43 EST 2013

SystemAdmin - Wed Feb 20 07:54:25 EST 2013
Thanks for your reply.I need it in DXL scripting.

The build in Excel Export IS a DXL script. You can find it under:

DOORS HOME\lib\dxl\standard\export\office

You can adapt it to automatically export the current module (i.e remove the GUI) or you can leave the script as is and use a batch automation technique (search the forum for batch export) to launch that script from another DXL script.

Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: To export the all the column data in a view of a module via DXL scripting
SystemAdmin - Thu Feb 21 06:35:06 EST 2013

Mathias Mamsch - Wed Feb 20 10:39:43 EST 2013
The build in Excel Export IS a DXL script. You can find it under:

DOORS HOME\lib\dxl\standard\export\office

You can adapt it to automatically export the current module (i.e remove the GUI) or you can leave the script as is and use a batch automation technique (search the forum for batch export) to launch that script from another DXL script.

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Hello,

Yes there is a script in the folder. But what I am looking for is something an automation.

Consider this example:

I have already done the script for the following scenario:

If I click on the button it should open the particular module in particular view and moreover it should export all the column data into excel.

I can attach the script if needed. I got stuck up in exporting now(now my script will open the module in particular view).

Can you please help on this.

-Shriraam

Re: To export the all the column data in a view of a module via DXL scripting
Gedinfo - Thu Feb 21 09:04:16 EST 2013

SystemAdmin - Thu Feb 21 06:35:06 EST 2013
Hello,

Yes there is a script in the folder. But what I am looking for is something an automation.

Consider this example:

I have already done the script for the following scenario:

If I click on the button it should open the particular module in particular view and moreover it should export all the column data into excel.

I can attach the script if needed. I got stuck up in exporting now(now my script will open the module in particular view).

Can you please help on this.

-Shriraam

I have developed a script which will filter four columns, then export into Excel.

There are three or more files associated with it.

It may be possible for me to prune it down to one module which I can post.

Let me know if you are interested.

Re: To export the all the column data in a view of a module via DXL scripting
SystemAdmin - Tue Feb 26 05:57:18 EST 2013

Gedinfo - Thu Feb 21 09:04:16 EST 2013
I have developed a script which will filter four columns, then export into Excel.

There are three or more files associated with it.

It may be possible for me to prune it down to one module which I can post.

Let me know if you are interested.

Thanks a lot. Please do post your code, what I am looking for is the export of the particular view in a DOORS module(all the column data).

-Shriraam

Re: To export the all the column data in a view of a module via DXL scripting
Gedinfo - Tue Feb 26 09:57:07 EST 2013

SystemAdmin - Tue Feb 26 05:57:18 EST 2013
Thanks a lot. Please do post your code, what I am looking for is the export of the particular view in a DOORS module(all the column data).

-Shriraam

This script is run on an executable module, looking for a specific template present in the Test Comment column.
It then filters the objects based on the template, then exports the columns into Excel.

It is set up to only use certain columns for export, therefore, it removes the columns, then reloads the columns needed, then filters the data, then exports.

The function makeExcelExportUI(mMod) is propietary, but based off of the Galactic Solutions Group function.

Hope this helps.
Attachments

attachment_14945112_ColumnToExcel.dxl

Re: To export the all the column data in a view of a module via DXL scripting
SystemAdmin - Tue Feb 26 23:47:07 EST 2013

Gedinfo - Tue Feb 26 09:57:07 EST 2013
This script is run on an executable module, looking for a specific template present in the Test Comment column.
It then filters the objects based on the template, then exports the columns into Excel.

It is set up to only use certain columns for export, therefore, it removes the columns, then reloads the columns needed, then filters the data, then exports.

The function makeExcelExportUI(mMod) is propietary, but based off of the Galactic Solutions Group function.

Hope this helps.

Hey Thanks a ton. I tried running your script in executable module using DXL Editor.

I am getting the following error on Line 219:

-E-DXL: <Line:219> Improperly linked token
-E-DXL: Not <Line:219> declared variable (makeExcelExportUI)
-I-DXL: Done. Back Reported Errors: 2 Back Reported Warnings: 0

Can you please help me out.

-Shriraam

Re: To export the all the column data in a view of a module via DXL scripting
SystemAdmin - Wed Feb 27 07:47:36 EST 2013

SystemAdmin - Tue Feb 26 23:47:07 EST 2013
Hey Thanks a ton. I tried running your script in executable module using DXL Editor.

I am getting the following error on Line 219:

-E-DXL: <Line:219> Improperly linked token
-E-DXL: Not <Line:219> declared variable (makeExcelExportUI)
-I-DXL: Done. Back Reported Errors: 2 Back Reported Warnings: 0

Can you please help me out.

-Shriraam

Hello All,

Please find the attached code.

Here I am trying to automate the tasks just by clicking on the button...but on certain tasks Like "Create Reko", "SA Newsletter" etc.. I have done Hard coded of all the columns into an excel except for NTG5 Newsletter.

But I felt that it is not correct way.

Please help me to AUTOMATE by exporting the column data into an excel sheet of a particular view.

-Shriraam

Edited by: admin on Mar 4, 2013 11:19 AM

Re: To export the all the column data in a view of a module via DXL scripting
Gedinfo - Wed Feb 27 08:57:09 EST 2013

SystemAdmin - Wed Feb 27 07:47:36 EST 2013
Hello All,

Please find the attached code.

Here I am trying to automate the tasks just by clicking on the button...but on certain tasks Like "Create Reko", "SA Newsletter" etc.. I have done Hard coded of all the columns into an excel except for NTG5 Newsletter.

But I felt that it is not correct way.

Please help me to AUTOMATE by exporting the column data into an excel sheet of a particular view.

-Shriraam

Edited by: admin on Mar 4, 2013 11:19 AM

You will have to obtain the function from Galactic Solutions at:
http://www.galactic-solutions.com/GalacticDownloads.htm

As I mentioned, the function that is causing you problems is proprietary, and I am not allowed to post it.

Re: To export the all the column data in a view of a module via DXL scripting
SystemAdmin - Wed Feb 27 09:17:24 EST 2013

SystemAdmin - Wed Feb 27 07:47:36 EST 2013
Hello All,

Please find the attached code.

Here I am trying to automate the tasks just by clicking on the button...but on certain tasks Like "Create Reko", "SA Newsletter" etc.. I have done Hard coded of all the columns into an excel except for NTG5 Newsletter.

But I felt that it is not correct way.

Please help me to AUTOMATE by exporting the column data into an excel sheet of a particular view.

-Shriraam

Edited by: admin on Mar 4, 2013 11:19 AM

Hard coding the column names may not be the best way, but the fastest. The only problem with it is that you will have to make sure everyone uses the newest version of your script (deployment e.g. via a network share).

Alternatives:
  • define a file (e.g. ini style or xml style) where every user who runs the script has access to and read it from your code.
  • define a doors module as a configuration module. e.g. headings on level 1 contain the name of the reports, object text on level 2 contain the name of the columns. Everyone has read access to the module, admins have write access to the module.

Re: To export the all the column data in a view of a module via DXL scripting
SystemAdmin - Thu Feb 28 02:07:25 EST 2013

SystemAdmin - Wed Feb 27 09:17:24 EST 2013
Hard coding the column names may not be the best way, but the fastest. The only problem with it is that you will have to make sure everyone uses the newest version of your script (deployment e.g. via a network share).

Alternatives:

  • define a file (e.g. ini style or xml style) where every user who runs the script has access to and read it from your code.
  • define a doors module as a configuration module. e.g. headings on level 1 contain the name of the reports, object text on level 2 contain the name of the columns. Everyone has read access to the module, admins have write access to the module.

Hello,

Thanks all for your replies. is there any simpler way to export the column data instead of downloading?

-Shriraam

Re: To export the all the column data in a view of a module via DXL scripting
bmohamed - Mon Nov 24 14:26:12 EST 2014

SystemAdmin - Tue Feb 26 05:57:18 EST 2013
Thanks a lot. Please do post your code, what I am looking for is the export of the particular view in a DOORS module(all the column data).

-Shriraam

This code was modified from this forum posting by Jim(iron-man) about automating MS Word exports:  https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014305335#77777777-0000-0000-0000-000014585954

Right now I have it set to export the view that I want using the Galactic Solutions Enhanced Export to Excel.  It can be modified to use the standard DOORS excel export with the lines 39 and 48 I commented out.  From the DOORS explorer window, select only the modules you want to export then run this dxl.

//post by Jim(iron-man?) https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014305335#77777777-0000-0000-0000-000014587301

Skip selectedItems = getSelectedItems ()
Item I = null
for I in selectedItems do
{
    if(isDeleted(I) || null I) {continue}
        if (type (I) == "Formal")
        {
                Module m = read(fullName(I),true)
                load view "ExcelExport"
                delete column 0
                {
                        // override some default message box functions, so they will only print the data but 
                        // not pause execution. Write to a log file here! 
                         
                        bool confirm (string s) { print "Confirmed: " s "\n"; return true }
                        void ack (string s) {print "Acknowledge: " s "\n" }
                        void acknowledge (string s) {print "Acknowledge: " s "\n"  }
                        void infobox (string s) {print "Info: " s "\n" }
                        void info (string s) {print "Info: " s "\n" }
                         
                        DB theDiag = null
                         
                        // Now override block and show, to only do realize
                        void show  (DB x) { realize x; theDiag = x }
                        void block (DB x) { realize x; theDiag = x }
                         
                        if (null current Module) {
                                print "You need to have a current Module set for the export."
                                halt
                        }
                         
                        // we need braces, since -D will be executed at top level and we will get name
                        // clashes for variable defined in word.dxl and the other includes of it.
                        {
                                // now include the word.dxl -> this will pop up the dialog, but not halt execution
                                // due to the overrides above
                                //#include <standard/export/office/excel.dxl> //for the standard excel exporter
                                #include <addins/user/EnhancedExportToExcel(modified).dxl>
                         
                                // here we can change the dialog options. See itfui2.inc and word.dxl for all 
                                // the options
                               // set(exportHeadingsToggle, false)   // turn off export of headings
                               //set(exportWarnUnregOLE,false)   //turn off ole warning
                         
                                // now manually launch the export button callback
                                //doExcel theDiag //for the standard excel exporter
                                exportModuleToExcel theDiag
                         
                                // get rid of the dialog
                                if (!null theDiag) destroy theDiag
                         
                                // close DOORS
                                //exit_
                        }
                }
                close(m)
        }
}
 
delete selectedItems

 

Re: To export the all the column data in a view of a module via DXL scripting
DXLAdimn - Tue Aug 01 07:54:42 EDT 2017

Hi all,

Thanks for your inputs. I am also looking for generating excel export for a particular view.  I have tried to run the code Enhanced Excel Export that i downloaded from Galactic Solutions, the output is looking fine but OLE images and table are getting scattered across the sheet.

Could you please help me how to fit the OLE images and tables in a particular cell and it is not supposed to be floated across the sheet and also hiding the content of the its parent or child object text.

I have downloaded the code from the below website:

http://galactic-solutions.com/downloads/GalacticDownloadExcel.htm

 

Please find the attachment for clear understanding.

 

Thanks,

Naidu.


Attachments

excel export.JPG